﻿#include "ChineseHistoryIndex.h"
#include "ui_ChineseHistoryIndex.h"
#include <QDebug>

ChineseHistoryIndex::ChineseHistoryIndex(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ChineseHistoryIndex)
{
    ui->setupUi(this);

    connect(ui->pushButton_timeline, SIGNAL(clicked()), this, SLOT(slotIndexButtonClicked()));
    connect(ui->pushButton_map, SIGNAL(clicked()), this, SLOT(slotIndexButtonClicked()));

    // 时间线
    m_chineseHistoryTimeLine = new ChineseHistoryTimeLine(this);
    m_chineseHistoryTimeLine->setGeometry(0, 0, m_chineseHistoryTimeLine->width(), m_chineseHistoryTimeLine->height());
    m_chineseHistoryTimeLine->hide();

}

ChineseHistoryIndex::~ChineseHistoryIndex()
{
    delete ui;
}

void ChineseHistoryIndex::slotIndexButtonClicked()
{
    QPushButton *send = qobject_cast<QPushButton *>(sender());
    if(send == ui->pushButton_timeline)
    {
        m_chineseHistoryTimeLine->show();
    }
    else if(send == ui->pushButton_map)
    {
    }
}
